exports.popup = function(obj){
    
    Ti.API.info(Ti.Platform.displayCaps.platformHeight + "|" + Ti.Platform.displayCaps.platformWidth);
    
    var borderSpace = 100;
    
    var win = Titanium.UI.createWindow({
	    height:250,
        width:300,
        backgroundColor:'black',
        borderWidth:3,
        borderColor:'#336699',
        left:10,
        top:50,
        layout:'vertical'
	});
	
	
	var value = new Date();
	
	var picker = Ti.UI.createPicker({
		type:Ti.UI.PICKER_TYPE_DATE,
		value:value
	});

	picker.selectionIndicator = true;
	picker.setLocale('EN-gb');
	win.add(picker);
	
	var btn = Ti.UI.createButton({title:'Done'});
	win.add(btn);
	
	btn.addEventListener('click',function(e)
	{
		obj.value = picker.value.toGMTString();
		win.close();
	});
    
    return win;
}